using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public partial class GameManager : SingletonMonoBehaviour<GameManager>
{
    private void Awake()
    {
        INI_Singleton();
        DontDestroyOnLoad(this);
    }

    private void Start()
    {
        AudioManager.Instance.StartMenu();
    }

    void Update()
    {
        //RainbowColor(8);
        EnterGame();
    }

    private void EnterGame()
    {
        if (Input.anyKeyDown)
        {
            if (SceneManager.GetActiveScene().buildIndex == 0)
            {
                SceneManager.LoadScene(1);
                AudioManager.Instance.GamePlay();
            }
        }
    }

    public void GameComplete()
    {
        SaveLoadManager.Instance.GameComplete();
        MainRole.Instance.gameObject.SetActive(false);
    }

    public void GameOver()
    {
        SaveLoadManager.Instance.Load();
    }
}
